<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="index.html" method="post" class="definewidth m20">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">药品编号</td>
        <td id="id">J6764</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">图片</td>
        <td><img id="logo" name="logo"></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">进价</td>
        <td id="inPrice">2元</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">售价</td>
        <td id="outPrice">128.9元</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">药品名称</td>
        <td id="drugName">感冒药</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">药品类型</td>
        <td id="drugType">处方药</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">简单描述</td>
        <td id="description">用于普通感冒</td>
    </tr>

    <tr>
        <td width="10%" class="tableleft">保质期</td>
        <td id="quality">2016年01月01日</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">详细描述</td>
        <td id="detailDescription">该药仅用于普通的流行性感冒,孕妇小孩慬用……</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">生产厂商</td>
        <td id="factory">哈药六厂生产</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">服用说明</td>
        <td id="instruction">一次两粒一日三次</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">总进数量</td>
        <td id="totalNumber">3000袋</td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">库存</td>
        <td id="resetNumber">1000袋</td>
    </tr>
	<tr>
        <td width="10%" class="tableleft">备注</td>
        <td id="note">暂无服用后不良记录</td>
	</tr>
    <tr>
        <td colspan="2">
			<center>
				<button type="button" class="btn btn-success" onclick="black()">返回列表</button>
			</center>
		</td>
    </tr>
</table>
</form>
<script type="text/javascript">
    $(function () {
        show();
    })
    function show(){
        //获取url
        (function($){
            $.getUrlParam
                = function(name)
            {
                var reg
                    = new RegExp("(^|&)"+
                    name +"=([^&]*)(&|$)");
                var r
                    = window.location.search.substr(1).match(reg);
                if (r!=null) return unescape(r[2]); return null;
            }
        })(jQuery);
        var id = $.getUrlParam('id');
        $.ajax({
            type:"GET",
            url: "/drug/getDrupById?id="+id,
            success: function(vo){
                $("#id").html(vo.id);
                $("#logo").attr("src",vo.img);
                $("#inPrice").html(vo.inPrice);
                $("#outPrice").html(vo.outPrice);
                $("#drugName").html(vo.drugName);
                $("#drugType").html(vo.drugType);
                $("#description").html(vo.description);
                $("#quality").html(vo.quality);
                $("#detailDescription").html(vo.detailDescription);
                $("#factory").html(vo.factory);
                $("#instruction").html(vo.instruction);
                $("#totalNumber").html(vo.totalNumber);
                $("#resetNumber").html(vo.totalNumber);
                $("#note").html(vo.totalNumber);
            }
        });
    }
    function black() {
        window.location.href="/Medicine/index.html";
    }
</script>
</body>
</html>